package com.jenkins.test.cron.task;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @version V1.0.0
 * @ClassName: {@link TaskRunnableContent}
 * @Description: TaskRunnableContent
 * @author: Lanzhou
 * @date: 2021/6/28 15:52
 * @Copyright:2020 All rights reserved.
 */
public class TaskRunnableContent {

    private static final ConcurrentHashMap<String, JobRunnable> RUNNABLE_CONTENT = new ConcurrentHashMap<>();

    static {
        RUNNABLE_CONTENT.put("abed125", new PrintJob());
        RUNNABLE_CONTENT.put("abed256", new XiaBanJob());
        RUNNABLE_CONTENT.put("abed148", new YinJob());
    }

    /**
     * 获取工作任务
     *
     * @param key key
     */
    public static JobRunnable getJobTask(String key) {
        return RUNNABLE_CONTENT.get(key);
    }

}
